<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table>
    姓名:<span th:text="${user.name}"></span>
    年龄:<span th:text="${user.age}"></span>
    <ul th:each="user:${userList}">
        <li th:text="${user.name}"></li>
        <li th:text="${user.age}"></li>
    </ul>
    <span th:if="${user.age<=20}">青年</span>
    <span th:if="${user.age>=40 && user.age<=61}">中老年</span>
</table>
</body>
</html>